import request from '@/utils/request'

//removeQueueListener
export function removeQueueListener() {
  return request({
    url: `/system/userNotification/removeQueueListener`,
    method: 'get'
  })
}

// 更改通知状态（未读>>已读）
export function changeUnRead(userNotificationId) {
  return request({
    url: `/system/userNotification/changeUnRead/${userNotificationId}`,
    method: 'get'
  })
}

// 获取当前用户未读通知
export function getUnread(userId) {
  return request({
    url: `/system/userNotification/getUnread/${userId}`,
    method: 'get'
  })
}

// 查询用户通知表列表
export function listUserNotification(query) {
  return request({
    url: '/system/userNotification/list',
    method: 'get',
    params: query
  })
}

// 查询用户通知表详细
export function getUserNotification(userNotificationId) {
  return request({
    url: '/system/userNotification/' + userNotificationId,
    method: 'get'
  })
}

// 新增用户通知表
export function addUserNotification(data) {
  return request({
    url: '/system/userNotification',
    method: 'post',
    data: data
  })
}

// 修改用户通知表
export function updateUserNotification(data) {
  return request({
    url: '/system/userNotification',
    method: 'put',
    data: data
  })
}

// 删除用户通知表
export function delUserNotification(userNotificationId) {
  return request({
    url: '/system/userNotification/' + userNotificationId,
    method: 'delete'
  })
}
